package jalgebrava.util.collections;

import java.util.Iterator;

/**
 * An iterator over a collection where the {@link java.util.Iterator#remove()} will always
 * throw an {@link UnsupportedOperationException}. Convenience class.
 * @param <E> Type of elements
 */
public abstract class ImmutableIterator<E> implements Iterator<E> {
	/**
	 * Always throws an {@link UnsupportedOperationException}
	 * {@inheritDoc}
	 */
	@Override
	public final void remove() {
		throw new UnsupportedOperationException("Remove not supported");
	}
}
